package org.jacms.test;

import java.io.Serializable;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

@ManagedBean(name = "helloBean")
@SessionScoped
public class HelloWorld implements Serializable {
	private static final long serialVersionUID = 1L;
	private String name;

	public void setName(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}
	
	public String greeting(String begin) {
		if (name == null) {
			return "What is yours?";
		}
		return String.format("%s, %s!", begin, name);
	}
	
	public void resp(String n) {
		System.out.println(n);
	}
}
